Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT/#87] 인증 동네 리스트 조회 구현 #88

Merged
merged 6 commits into from
Feb 18, 2025
Merged

Conversation

gahyuun
Copy link
Collaborator

@gahyuun gahyuun commented Feb 18, 2025

💡 Issue

📄 Description

  • 인증된 동네 리스트 조회 API 구현
  • 기존에 동네 중복 인증시 발생했던 에러 제거
  • 동네 인증 시 최대 동네 인증 개수 5개가 넘어가면 에러 반환

💬 To Reviewers

  • MemberArea라는 변수명에서 VerfieidArea라는 변수명으로 수정했습니당

@gahyuun gahyuun added the ✨ FEAT 새로운 기능 추가 label Feb 18, 2025
@gahyuun gahyuun self-assigned this Feb 18, 2025
@gahyuun gahyuun requested a review from ckkim817 as a code owner February 18, 2025 13:39
@gahyuun gahyuun added the size/S label Feb 18, 2025
Copy link
Member

@ckkim817 ckkim817 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 ~!

@@ -48,7 +48,7 @@ public enum ErrorType {
INVALID_FAVORITE_SPOT_ERROR(HttpStatus.BAD_REQUEST, 40017, "유효하지 않은 favoriteSpot입니다."),
INVALID_FAVORITE_SPOT_RANK_SIZE_ERROR(HttpStatus.BAD_REQUEST, 40030, "favoriteSpotRank의 사이즈가 잘못되었습니다."),
INVALID_FAVORITE_CUISINE_RANK_SIZE_ERROR(HttpStatus.BAD_REQUEST, 40031, "favoriteCuisineRank의 사이즈가 잘못되었습니다."),
ALREADY_VERIFIED_AREA_ERROR(HttpStatus.BAD_REQUEST, 40032, "이미 인증된 동네가 존재합니다."),
INVALID_AREA_NUMBER_ERROR(HttpStatus.BAD_REQUEST, 40032, "동네 인증은 최소 1개 ~ 최대 5개까지 가능합니다."),
Copy link
Member

@ckkim817 ckkim817 Feb 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3:

진짜 별 거 아닌데 NUMBER 대신 COUNT 어떠신지 ㅎㅅㅎ

그리고 요 에러 명세에 없던데 명세에도 추가해 주세요 ~!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e478457
통일성을 위해 SIZE로 사용했습니당

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 에러 동네 인증하기 명세에 이미 있습니당~

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

옴마 인증 동네 조회랑 헷갈렸네용 굳

@@ -61,6 +62,7 @@ public class MemberService {
private static final char[] CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.".toCharArray();
private static final int MAX_NICKNAME_LENGTH = 16;
private static final String NICKNAME_PATTERN = "^[a-zA-Z0-9_.가-힣]+$";
private static final int MAX_VERIFIED_AREA_LIST = 5;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3:

여기도 LIST 대신 SIZE? COUNT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e478457
SIZE 사용했습니당

List<VerifiedAreaEntity> verifiedAreaEntityList = verifiedAreaRepository.findAllByMemberId(
memberEntity.getId());

if (verifiedAreaEntityList.size() > MAX_VERIFIED_AREA_LIST - 1) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3:

개인적으로 -1 쓰는 거 대신 >=를 쓰는 게 더 이뻐보여요 !

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e478457
수정했습니당

memberEntity.getId());
List<VerifiedAreaListResponse.VerifiedArea> verifiedAreaList = verifiedAreaEntityList.stream()
.map(verifiedAreaEntity -> new VerifiedAreaListResponse.VerifiedArea(verifiedAreaEntity.getId(),
verifiedAreaEntity.getName()))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2:

  1. VerifiedAreaListResponse 내부에 VerifiedArea를 만들어서 사용하는 것보다 이미 있는 VerifiedAreaResponse를 사용하는 건 어떨까요? (제안)

  2. new를 통한 객체 생성보다는 정적 팩토리 메서드 방식으로 바꿔주면 좋을 것 같아용

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e478457
수정했습니당

@gahyuun gahyuun merged commit c7002da into develop Feb 18, 2025
1 check passed
Copy link
Member

@ckkim817 ckkim817 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 어푸룹이용 ~!

@gahyuun gahyuun deleted the feat/#87 branch February 18, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ FEAT 새로운 기능 추가 size/S 🦊 가현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] 인증된 동네 조회 API 구현
2 participants